
(*
	----------------------------------------------

	  unaDef.inc
	  compiler options and conditional defines

	----------------------------------------------
	  This source code cannot be used without
	  proper license granted to you as a private
	  person or an entity by the Lake of Soft, Ltd

	  Visit http://lakeofsoft.com/ for more information.

	  Copyright (c) 2001, 2005 Lake of Soft, Ltd
		     All rights reserved
	----------------------------------------------

	  created by:
		Lake, Apr 2001

	  modified by:
		Lake, Jan-Oct 2002
		Lake, Jan-Jul 2003
		Lake, Sep-Dec 2005
		Lake, Dec 2007

	----------------------------------------------
*)

{xx $DEFINE DEBUG }	// defined manually to enable debugging of the sources

{xx $DEFINE CONSOLE }	// defined automatically by compiler when building console application

{xx $DEFINE __SYSUTILS_H_ }	// define if you are using SysUtils.pas (Forms.pas, VCL classes)
				// defined automatically in VC 2.5 Pro version when compiling to GUI target,
				// unless NO_SU_AUTODEFINE symbol is defined (see below)

{xx $DEFINE NO_SU_AUTODEFINE }	// when defined disables auto-definition of __SYSUTILS_H_ symbol in Pro version with GUI target


{xx $DEFINE NO_ANSI_SUPPORT }	// you can define this symbol if you do not need support for ANSI WinAPI
				// NOTE: most likely your application will not run under Win9x/Me in this case


// -- VC 2.5 license type --

{$I unaVC25_license.inc }

// --

//
{$IFDEF VC25_ENTERPRISE }
  //
  {$DEFINE VC25_OVERLAPPED }      // enable overlapped calls
  {$DEFINE VC25_WINSOCK20 }       // enable WinSock 2.0 extensions
  //
  {$IFDEF VC25_WIN9X_COMPATIBLE }
  {$ELSE }
    //
    {$DEFINE VC25_IOCP }            // enable IOCP calls
    //
  {$ENDIF VC25_WIN9X_COMPATIBLE }
  //
{$ELSE }
  //
{$ENDIF VC25_ENTERPRISE }


// -- ============= --


{$IFDEF CONSOLE }
  //
{$ELSE }
  {$IFDEF NO_SU_AUTODEFINE }
    // do not define __SYSUTILS_H_
  {$ELSE }
    // link with SysUtils.pas
    {$DEFINE __SYSUTILS_H_ }
    //
  {$ENDIF NO_SU_AUTODEFINE }
  //
{$ENDIF CONSOLE }

{$IFDEF FPC }
  {$MODE DELPHI }
  {$ASMMODE Intel }
  {$DEFINE VER180 }
{$ENDIF FPC }


{$IFDEF VER90 }
  // Delphi 2.0
  {$DEFINE __BEFORE_D3__ }	// Not Delphi 3.0 yet
  {$DEFINE __BEFORE_D4__ }	// Not Delphi 4.0 yet
  {$DEFINE __BEFORE_D5__ }	// Not Delphi 5.0 yet
  {$DEFINE __BEFORE_D6__ }	// Not Delphi 6.0 yet
  {$DEFINE __BEFORE_D7__ }	// Not Delphi 7.0 yet
  {$DEFINE __BEFORE_D8__ }	// Not Delphi 8.0 yet
  {$DEFINE __BEFORE_D9__ }	// Not Delphi 2005 yet
  {$DEFINE __BEFORE_DA__ }	// Not Delphi 2006 yet
  {$DEFINE __BEFORE_DB__ }	// Not Delphi 2007 yet
  {$DEFINE __BEFORE_DC__ }	// Not Delphi 2009 yet
  //
  {$DEFINE __AFTER_D1__ }	// Delphi 2.0 or later
{$ELSE }
  {$IFDEF VER100 }
    // Delphi 3.0
    {$DEFINE __BEFORE_D4__ }	// Not Delphi 4.0 yet
    {$DEFINE __BEFORE_D5__ }	// Not Delphi 5.0 yet
    {$DEFINE __BEFORE_D6__ }	// Not Delphi 6.0 yet
    {$DEFINE __BEFORE_D7__ }	// Not Delphi 7.0 yet
    {$DEFINE __BEFORE_D8__ }	// Not Delphi 8.0 yet
    {$DEFINE __BEFORE_D9__ }	// Not Delphi 2005 yet
    {$DEFINE __BEFORE_DA__ }	// Not Delphi 2006 yet
    {$DEFINE __BEFORE_DB__ }	// Not Delphi 2007 yet
    {$DEFINE __BEFORE_DC__ }	// Not Delphi 2009 yet
    //
    {$DEFINE __AFTER_D1__ }	// Delphi 2.0 or later
    {$DEFINE __AFTER_D2__ }	// Delphi 3.0 or later
  {$ELSE }
    {$IFDEF VER110 }
      // CBuilder 3.0
      {$DEFINE __BEFORE_D4__ }
      {$DEFINE __BEFORE_D5__ }
      {$DEFINE __BEFORE_D6__ }
      {$DEFINE __BEFORE_D7__ }
      {$DEFINE __BEFORE_D8__ }
      {$DEFINE __BEFORE_D9__ }
      {$DEFINE __BEFORE_DA__ }
      {$DEFINE __BEFORE_DB__ }
      {$DEFINE __BEFORE_DC__ }	// Not Delphi 2009 yet
      //
      {$DEFINE __AFTER_D1__ }
      {$DEFINE __AFTER_D2__ }
    {$ELSE }
      {$IFDEF VER120 }
	// Delphi 4.0
	{$DEFINE __BEFORE_D5__ }
	{$DEFINE __BEFORE_D6__ }
	{$DEFINE __BEFORE_D7__ }
	{$DEFINE __BEFORE_D8__ }
	{$DEFINE __BEFORE_D9__ }
	{$DEFINE __BEFORE_DA__ }
	{$DEFINE __BEFORE_DB__ }
        {$DEFINE __BEFORE_DC__ }	// Not Delphi 2009 yet
	//
	{$DEFINE __AFTER_D1__ }
	{$DEFINE __AFTER_D2__ }
	{$DEFINE __AFTER_D3__ }
      {$ELSE }
	{$IFDEF VER130 }
	  // Delphi 5.0 / C++ Builder 5.0
	  {$DEFINE __BEFORE_D6__ }
	  {$DEFINE __BEFORE_D7__ }
	  {$DEFINE __BEFORE_D8__ }
	  {$DEFINE __BEFORE_D9__ }
	  {$DEFINE __BEFORE_DA__ }
	  {$DEFINE __BEFORE_DB__ }
          {$DEFINE __BEFORE_DC__ }	// Not Delphi 2009 yet
	  //
	  {$DEFINE __AFTER_D1__ }
	  {$DEFINE __AFTER_D2__ }
	  {$DEFINE __AFTER_D3__ }
	  {$DEFINE __AFTER_D4__ }
	{$ELSE }
	  {$IFDEF VER140 }
	    // Delphi 6.0 / C++ Builder 6.0
	    {$DEFINE __BEFORE_D7__ }
	    {$DEFINE __BEFORE_D8__ }
	    {$DEFINE __BEFORE_D9__ }
	    {$DEFINE __BEFORE_DA__ }
	    {$DEFINE __BEFORE_DB__ }
            {$DEFINE __BEFORE_DC__ }	// Not Delphi 2009 yet
	    //
	    {$DEFINE __AFTER_D1__ }
	    {$DEFINE __AFTER_D2__ }
	    {$DEFINE __AFTER_D3__ }
	    {$DEFINE __AFTER_D4__ }
	    {$DEFINE __AFTER_D5__ }
	  {$ELSE }
	    {$IFDEF VER150 }
	      // Delphi 7.0
	      {$DEFINE __BEFORE_D8__ }
              {$DEFINE __BEFORE_D9__ }
              {$DEFINE __BEFORE_DA__ }
              {$DEFINE __BEFORE_DB__ }
              {$DEFINE __BEFORE_DC__ }	// Not Delphi 2009 yet
              //
              {$DEFINE __AFTER_D1__ }
              {$DEFINE __AFTER_D2__ }
              {$DEFINE __AFTER_D3__ }
              {$DEFINE __AFTER_D4__ }
              {$DEFINE __AFTER_D5__ }
	      {$DEFINE __AFTER_D6__ }
            {$ELSE }
              {$IFDEF VER160 }
                // Delphi 8.0
                {$DEFINE __BEFORE_D9__ }
                {$DEFINE __BEFORE_DA__ }
		{$DEFINE __BEFORE_DB__ }
                {$DEFINE __BEFORE_DC__ }	// Not Delphi 2009 yet
		//
		{$DEFINE __AFTER_D1__ }
		{$DEFINE __AFTER_D2__ }
		{$DEFINE __AFTER_D3__ }
		{$DEFINE __AFTER_D4__ }
		{$DEFINE __AFTER_D5__ }
		{$DEFINE __AFTER_D6__ }
		{$DEFINE __AFTER_D7__ }
	      {$ELSE }
		{$IFDEF VER170 }
		  //
		  // Delphi 2005 (D9)
		  {$DEFINE __BEFORE_DA__ }
		  {$DEFINE __BEFORE_DB__ }
                  {$DEFINE __BEFORE_DC__ }	// Not Delphi 2009 yet
		  //
		  {$DEFINE __AFTER_D1__ }
		  {$DEFINE __AFTER_D2__ }
		  {$DEFINE __AFTER_D3__ }
		  {$DEFINE __AFTER_D4__ }
		  {$DEFINE __AFTER_D5__ }
		  {$DEFINE __AFTER_D6__ }
		  {$DEFINE __AFTER_D7__ }
		  {$DEFINE __AFTER_D8__ }
		{$ELSE }
		  {$IFDEF VER180 }
		    //
                    {$DEFINE __BEFORE_DC__ }	// Not Delphi 2009 yet
                    //
		    // Delphi 2006 (DA) or Delphi 2007 (DB),
                    // fortunately we can use VER185 (see below)
		    //
		    {$DEFINE __AFTER_D1__ }  	// Delphi 2.0 or later
		    {$DEFINE __AFTER_D2__ }  	// Delphi 3.0 or later
		    {$DEFINE __AFTER_D3__ }  	// Delphi 4.0 or later
		    {$DEFINE __AFTER_D4__ }  	// Delphi 5.0 or later
		    {$DEFINE __AFTER_D5__ }  	// Delphi 6.0 or later
		    {$DEFINE __AFTER_D6__ }  	// Delphi 7.0 or later
		    {$DEFINE __AFTER_D7__ }  	// Delphi 8.0 or later
		    {$DEFINE __AFTER_D8__ }  	// Delphi 2005 or later
		    {$DEFINE __AFTER_D9__ }	// Delphi 2006 or later
		    //
		    {$IFDEF VER185 }
		      //
		      // Delphi 2007 (11.0) defines both VER180 and VER185 while Delphi 2006 defines VER180 only
		      //
		      {$DEFINE __AFTER_DA__ }	// Delphi 2007 or later
		      //
		    {$ELSE }
		      //
		      {$DEFINE __BEFORE_DB__ }	// Not Delphi 2007 yet
		      //
		    {$ENDIF VER185 }
		  {$ELSE }
		    //
		    {$IFDEF VER190 }
		      //
                      // Delphi 2008? (never released)
                    {$ELSE }
                      {$IFDEF VER200 }
                        //
                        // Delphi 2009 (DC)
                        //
		        {$DEFINE __BEFORE_DD__ }	// Not Delphi 2010? yet
                        //
                        {$DEFINE __AFTER_D1__ }  	// Delphi 2.0 or later
                        {$DEFINE __AFTER_D2__ }  	// Delphi 3.0 or later
                        {$DEFINE __AFTER_D3__ }  	// Delphi 4.0 or later
                        {$DEFINE __AFTER_D4__ }  	// Delphi 5.0 or later
                        {$DEFINE __AFTER_D5__ }  	// Delphi 6.0 or later
                        {$DEFINE __AFTER_D6__ }  	// Delphi 7.0 or later
                        {$DEFINE __AFTER_D7__ }  	// Delphi 8.0 or later
                        {$DEFINE __AFTER_D8__ }  	// Delphi 2005 or later
                        {$DEFINE __AFTER_D9__ }	        // Delphi 2006 or later
                        {$DEFINE __AFTER_DA__ }	        // Delphi 2007 or later
                        {$DEFINE __AFTER_DB__ }	        // Delphi 2009 or later
                        //
                      {$ENDIF VER200 }
		    {$ENDIF VER190 }
		  {$ENDIF VER180 }
		{$ENDIF VER170 }
	      {$ENDIF VER160 }
	    {$ENDIF VER150 }
	  {$ENDIF VER140 }
	{$ENDIF VER130 }
      {$ENDIF VER120 }
    {$ENDIF VER110 }
  {$ENDIF VER100 }
{$ENDIF VER90 }


{$IFDEF CONDITIONALEXPRESSIONS }
  //
  { D4 does not like that new directives }
  //{$IF Defined(DEBUG) }

  //{$ELSE}

  //{$IFEND}
{$ENDIF CONDITIONALEXPRESSIONS }


{$IFDEF DEBUG }

  // DEBUG options

  {$IFDEF VER90 }          // Delphi 2.0
  {$ELSE }

    {$IFDEF FORCE_OPTIMIZATION }
      // override optimization options
      {$ASSERTIONS OFF }
      //
    {$ELSE}
      //
      {$ASSERTIONS ON }		// $C+
      //				// generation of assersion code (affects binary code)
    {$ENDIF }

    {$IFDEF VER100 }         // Delphi 3.0
    {$ELSE }
      //
      {$IFDEF VER110 }         // CBuilder 3.0
      {$ELSE }

{$IFDEF FPC }
{$ELSE }
	{$DEFINITIONINFO ON }	// $YD
				// generation of symbol reference information
{$ENDIF FPC }

      {$ENDIF VER110 }
      //
    {$ENDIF VER100 }
    //
  {$ENDIF VER90 }


  {$DEBUGINFO ON }      // $D+
			// generation of debug info

  {$LOCALSYMBOLS ON }	// $L+
			// generation of local symbol information

  {$REFERENCEINFO ON }	// $Y+
			// generation of symbol reference information

  {$IFDEF FORCE_OPTIMIZATION }

    // override optimization options
    {$IOCHECKS OFF }
    {$OPTIMIZATION ON }
    {$OVERFLOWCHECKS OFF }
    {$RANGECHECKS OFF }
    {$STACKFRAMES OFF }

  {$ELSE}

    {$IOCHECKS ON }		// $I+
				// generation of checking I/O results code (affects binary code)

    {$OPTIMIZATION OFF }	// $O-
				// turn off optimization (affects binary code)

    {$OVERFLOWCHECKS ON }	// $Q+
				// generation of overflow checking code (affects binary code)

    {$RANGECHECKS ON }		// $R+
				// generation of range-checking code (affects binary code)

    {$STACKFRAMES ON }		// $W+
				// generation of stack frames for procedures and functions (affects binary code)

  {$ENDIF }

{$ELSE }

  {$IFDEF FPC }
    {$DEFINE RELEASE }
  {$ENDIF FPC }

  // NO DEBUG options

  {$IFDEF VER90 }    // Delphi 2.0
  {$ELSE }

    {$ASSERTIONS OFF }	// $C-
			// generation of assersion code (affects binary code)

    {$IFDEF VER100 }         // Delphi 3.0
    {$ELSE }
      {$IFDEF VER110 }         // CBuilder 3.0
      {$ELSE }

{$IFDEF FPC }
{$ELSE }
      {$DEFINITIONINFO OFF }	// $Y-
				// allow generation of symbol reference information
				// (affects binary code?)
{$ENDIF FPC }

      {$ENDIF }
    {$ENDIF }
  {$ENDIF }

  {$DEBUGINFO OFF }     // $D-
			// do not allow debug info to be generated

  {$IOCHECKS OFF }	// $I-
			// generation of checking I/O results code (affects binary code)

{$IFDEF FPC }
{$ELSE }
  {$LOCALSYMBOLS OFF }	// $L-
			// generation of local symbol information
{$ENDIF FPC }

  {$OPTIMIZATION OFF }	// $O+
			// turn on optimization (affects binary code)

  {$OVERFLOWCHECKS OFF }// $Q-
			// generation of overflow checking code (affects binary code)

  {$RANGECHECKS OFF }	// $R-
			// generation of range-checking code (affects binary code)

  {$STACKFRAMES OFF }	// $W-
			// generation of stack frames for procedures and functions (affects binary code)

{$IFDEF FPC }
{$ELSE }
  {$REFERENCEINFO OFF }	// $Y-
			// generation of symbol reference information
{$ENDIF FPC }

{$ENDIF }

// COMMON options

// -- description --

{$IFDEF NO_UNA_DESCR }
  //
{$ELSE }
  //
  {$IFDEF VCX_DEMO }
    {$DESCRIPTION 'VC25EJUN09' }        // Evaluation version
  {$ELSE }
    //
    {$IFDEF VC25_ENTERPRISE }
      //
      {$DESCRIPTION 'VC25XJUN09' }	// Enterprise
      //
    {$ELSE }
      {$DESCRIPTION 'VC25PJUN09' }      // Pro version
    {$ENDIF}
    //
  {$ENDIF VCX_DEMO }
  //
{$ENDIF }

// -- unknown --

  {$E-}
{$IFDEF FPC }
{$ELSE }
  {$F-}
  {$K-}
  {$N+}
{$ENDIF FPC }
  {$S-}

// -- common --

{$IFDEF VER90}          // Delphi 2.0
{$ELSE}

{$IFDEF FPC }
{$ELSE }
  {$IMPORTEDDATA ON }	// $G+
			// turn on creation of imported data references
			// NOTE: C++ Builder ?.0 crashes when installing packages compiled with $G-
{$ENDIF FPC }

  {$IFDEF VER100 }         // Delphi 3.0
  {$ELSE }
    {$IFDEF VER110 }         // CBuilder 3.0
    {$ELSE }

{$IFDEF FPC }
{$ELSE }
      {$REALCOMPATIBILITY OFF }	//
				// Real type is equivalent to Double
{$ENDIF FPC }

    {$ENDIF }
  {$ENDIF }
{$ENDIF }

{$ALIGN ON }		// $A+
			// align records to 8/16 boundaries

{$BOOLEVAL OFF }        // $B-
			// turn off full boolean evaluation
			// WARNING! turning is option on will introduce certain access violations

{$IFDEF FPC }
  {$LONGSTRINGS ON }	// $H+
			// turn on long string support
{$ENDIF FPC }

{$WRITEABLECONST OFF }	// $J-
			// turn off writeable const

{$TYPEINFO OFF }	// $M-
			// turn off RTTI (when possible)

{$TYPEDADDRESS OFF }	// $T-
			// turn off typed pointers

{$IFDEF FPC }
{$ELSE }

  {$SAFEDIVIDE OFF }	// $U-
			// turn off guards against the flawed FDIV instruction exhibited
			// by certain early Pentium processors
{$ENDIF FPC }

{$EXTENDEDSYNTAX ON }   // $X+
			// turn on extended syntax

{$MINENUMSIZE 4 }	// $Z+ or $Z4
			// set enum element size to 4 bytes

